package com.liujit.validator.constraints;

import com.liujit.validator.constraints.validate.AccountValid;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author: liujun
 * @date: 2021/6/18 3:34 下午
 * @description: 账号
 */
@Documented
@Constraint(validatedBy = AccountValid.class)
@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR,
        ElementType.PARAMETER, ElementType.TYPE_USE })
@Retention(RetentionPolicy.RUNTIME)
public @interface Account {

    String message() default "字母开头，5-16字节，允许字母数字下划线组合";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
